

class DDGoodsModel {
  final String? goodsId;
  final String? code;
  final String? icon;
  final String? type;
  final int? subType;
  final double? discount;
  final double? originalPrice;
  final double? price;
  final int? exchangeCoin;
  final int? originalExchangeCoin;
  final double? originalPriceRupee;
  final double? priceRupee;
  final double? localPaymentPriceRupee;
  final bool? isPromotion;
  final int? localPayOriginalPrice;
  final int? localPayPrice;
  final int? sortDesc;
  final String? tags;

  DDGoodsModel({
    this.goodsId,
    this.code,
    this.icon,
    this.type,
    this.subType,
    this.discount,
    this.originalPrice,
    this.price,
    this.exchangeCoin,
    this.originalExchangeCoin,
    this.originalPriceRupee,
    this.priceRupee,
    this.localPaymentPriceRupee,
    this.isPromotion,
    this.localPayOriginalPrice,
    this.localPayPrice,
    this.sortDesc,
    this.tags,
  });

  factory DDGoodsModel.fromJson(Map<String, dynamic> json) {
    return DDGoodsModel(
      goodsId: json['goodsId'],
      code: json['code'],
      icon: json['icon'],
      type: json['type'],
      subType: json['subType'],
      discount: json['discount'],
      originalPrice: json['originalPrice'],
      price: json['price'],
      exchangeCoin: json['exchangeCoin'],
      originalExchangeCoin: json['originalExchangeCoin'],
      originalPriceRupee: json['originalPriceRupee'],
      priceRupee: json['priceRupee'],
      localPaymentPriceRupee: json['localPaymentPriceRupee'],
      isPromotion: json['isPromotion'],
      localPayOriginalPrice: json['localPayOriginalPrice'],
      localPayPrice: json['localPayPrice'],
      sortDesc: json['sortDesc'],
      tags: json['tags'],
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'goodsId': goodsId,
      'code': code,
      'icon': icon,
      'type': type,
      'subType': subType,
      'discount': discount,
      'originalPrice': originalPrice,
      'price': price,
      'exchangeCoin': exchangeCoin,
      'originalExchangeCoin': originalExchangeCoin,
      'originalPriceRupee': originalPriceRupee,
      'priceRupee': priceRupee,
      'localPaymentPriceRupee': localPaymentPriceRupee,
      'isPromotion': isPromotion,
      'localPayOriginalPrice': localPayOriginalPrice,
      'localPayPrice': localPayPrice,
      'sortDesc': sortDesc,
      'tags': tags,
    };
  }
}